package io;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;

public class InputStreamReaderDemo {
    public static void main(String[] args) throws IOException
    {
        InputStreamReader isr=new InputStreamReader(
                new FileInputStream("d:/a.txt"), StandardCharsets.UTF_8);
        int data=0;
        while((data=isr.read())!=-1)
        {
            System.out.println((char)data);
        }


    }
}
